#pragma once

#include <pjsua2.hpp>
#include "my_account.hpp"

using namespace pj;

class MyCall : public Call
{

private:
    MyAccount *account;
    string wav_file_path;
    AudioMediaPlayer *wav_player;

public:
    AudioMedia* current_am;
    CallOpParam callOpParam;

    MyCall(MyAccount &acc, int call_id = PJSUA_INVALID_ID) : Call(acc, call_id)
    {
        account = &acc;
        wav_player = NULL;
        current_am = NULL;
    }

    void addWavpath(const string &file_name);

    void onCallState(OnCallStateParam &prm) override;

    void onCallMediaState(OnCallMediaStateParam &prm) override;

    void stopPlayer();
};
